import {ORDER_DATA} from './actionTypes.js'
import axios from 'axios'

export const getOrderDate = (page) => (dispatch) => {
  axios({
    method: 'get',
    url: '/json/orders.json'
  }).then((resp) => {
    dispatch({
      type: ORDER_DATA,
      currentPage: page,
      obj: resp.data
    })
  })
}